Skip to main content



Panikmache bei heise.de ? "Lücke" MySQL und Oracle fixt nicht schnell


Ich glaube, der Poster im Forum hat recht: nur Panikmache bei Heise.de. Ich habe mal fix die besagte Dabei geprüft und root besitzt sie:
-rw-r----- 1 root root 4602 Jul 26 00:37 my.cnf
Also alles ruhig bleiben und nur kurz prüfen ...


"Genderisierung" - *Kopfkrampf*


Was für Mist steht denn hier?
Die Kritik der Antwort finde ich richtig: #affig und #nervig ist es, ständig brav ein "-innen" anzuhängen. #aufarbeit



How to restore e.g. MP3 files from a FAT32-formatted hard drive with Linux


I'm currently rescuing files from a partly broken hard drive where the very early sectors are unreadable. It is a USB hard-drive ("mobile") from a DJ. So I will find it "easy" to search for #MP3 files (he doesn't use OGG).

First I tried to normally mount it, which fails due to the broken sectors 0-9 (which holds the required data). Also a fsck.vfat didn't work. So I had to install #myresuce and and #magicrescue.

I did it better in screens so I can leave them unattended:
screen -dmS myrescue myrescue /dev/sdb1 sdb1.bin

I had to wait ~ 10 minutes to start the next one:
screen -dmS magicrescue magicrescue -d sdb1/ -r mp3-id3v2 sdb1.bin

/dev/sdb1 is the USB drive and of course I needed to create ~/sdb1/ to have found files being written there.

Now there are a lot MP3 files but all 40 MB large. I will forward them to the DJ so he has to cut them to the right size.

I just thought you might be interested in before going to a "professional" #disk #rescue company.


Why I don't like payed support #2


I currently face a #bug in #Payara that doesn't allow TABLE_PER_CLASS and I cannot change the database layout (as then the main program needs to be changed which involves a lot risky work).

I have filled out a bug report ...
https://github.com/payara/Payara/issues/966

... But they don't want to handle it. I guess I'm not alone with this bug. I don't like such "payment model" where paying customers are priotized. I for my projects provide unpriotized support for any one, unpayed and in my free time:
My View - Mailer-Project Bug-Tracker
What do you think about such payment models? Good or bad?

2nd submit: better preview before test.


DayOfWeek not persisted without some work ...


I currently get this when I try to deploy my project:
org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class java.time.DayOfWeek] for the attribute [endDay] on the entity class [class org.mxchange.jcontactsbusiness.opening_times.BusinessOpeningTimes] is not a valid type for an enumerated mapping. The attribute must be defined as a Java enum.. Please see server.log for more details.
I'm trying to fix this by writing a AttributeConverter<DayOfWeek, String>.


apt-p2p - Ist this project dying?


On Fri, 19 Jul 2002 a user called "burris" has committed the first files for a pre-project. Now, 2016 almost nothing happens to it anymore. The author #CameronDale has seem to given it up and I have almost no time to continue on.

If you search for it:
You find 2 projects, maybe indepently created.

So maybe this weekend or next weekend I try to merge them both into mine and notify them to merge back to have all efforts combined.

You can find mine here:
https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=summary


The class does not have a descriptor, or a descriptor that does not use inheritance or uses a ClassExtractor for inheritance


The mentioned message still comes when you have @Inheritance (strategy = InheritanceType.TABLE_PER_CLASS) in your abstract (not-persisted) with latest version of #Payara / #Glassfish which both contains #EclipseLink by default.

Strange that they did not yet fix it. And unfortunally migrating to e.g. #WilfFly (which uses other #JPA) seems not so easy as you may think.

Currently I have no idea how to fix it and sadly I need the strategy as this #JavaEE application is written for an existing database layout.

Someone may have to raise a support ticket mentioning that the #bug is still there.

Reposted with #public visibility. Sorry for double message.


Let's Encrypt!


I have now installed a better #SSL certificate issued by #LetsEncrypt and with the help of this #python script: https://github.com/diafygi/acme-tiny

Plus I have used a largely expanded #shell script:
https://social.mxchange.org/renew-certs.sh

But now my SSL sites got rated with B by #SSLLabs because of an incomplete chain. I think I need to download the CA certificate and attach it at mine?

I also have (not yet reloaded) added DH parameters (DH = Diffie-Hellmann?) to my certificate parameters, I have read it will improve some security.


Problem with simple h:form, h:selectManyListbox and h:commandButton


I'm currently having trouble with this simple form getting working:
&lt;h:form id="choose_projects_form"&gt;
	&lt;div class="table_big"&gt;
		&lt;div class="table_header"&gt;
			&lt;h:outputText value="#{msg.USER_REPORTS_CHOOSE_PROJECTS_TITLE}" /&gt;
		&lt;/div&gt;

		&lt;div class="para"&gt;
			&lt;div class="form_label"&gt;
				&lt;h:outputLabel for="selectedProjects" value="#{msg.USER_CHOOSE_PROJECTS}" /&gt;
			&lt;/div&gt;

			&lt;div class="form_field"&gt;
				&lt;h:selectManyListbox styleClass="projects" id="selectedProjects" size="5" value="#{choosenProjectsReportsController.selectedProjects}" required="true" requiredMessage="#{msg.USER_FIELD_SELECTED_PROJECT_REQUIRED}"&gt;
					&lt;f:converter converterId="ProjectConverter" /&gt;
					&lt;f:selectItems value="#{choosenProjectsReportsController.availableProjects}" var="project" itemValue="#{project}" itemLabel="#{msg[project.i18nKey]}" /&gt;
				&lt;/h:selectManyListbox&gt;
			&lt;/div&gt;

			&lt;div class="clear"&gt;&lt;/div&gt;

			&lt;h:message for="selectedProjects" errorClass="errors" fatalClass="errors" warnClass="errors" showSummary="true" /&gt;
		&lt;/div&gt;

		&lt;div class="para notice"&gt;
			&lt;h:outputText value="#{msg.USER_CHOOSE_PROJECTS_NOTICE}" /&gt;
		&lt;/div&gt;

		&lt;div class="table_footer"&gt;
			&lt;h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /&gt;
			&lt;h:commandButton styleClass="submit" type="submit" action="#{choosenProjectsReportsController.doChooseProjects()}" value="#{msg.BUTTON_SHOW_CHOOSEN_PROJECT_STATISTICS}" /&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/h:form&gt;


The backing bean (web controller) has this defined:

...
import javax.enterprise.context.SessionScoped;
...
@Named ("choosenProjectsReportsController")
@SessionScoped
public class ReportsChoosenCustomersWebSessionBean extends BaseReportsController implements ReportsChoosenCustomersWebSessionController {
...
private final List&lt;ReportProject&gt; availableProjects; // +getter as no setter is needed/possible
...
private ReportProject selectedProjects[]; // + getter/setter
...
}


In constructor the list is initialized, in a @PostConstruct method it is being filed (ReportProject is an enumeration).

All projects are being shown an the selectManyListbox and commandButton are both correctly being rendered. If it select one (or more) and hit the submit button, a POST request goes.

The problem is that doChooseProjects() is not being invoked and also the converter's getAsObject() method is not invoked. Also no error message shows up (including log file).

A search on Internet like "selectManyListbox converter action not invoked" (no quotes) doesn't turn up any useful.


Glasfish / Payara sometimes throw ClassCastException


I sometimes get this error message after I have redeployed (also with in-place deployment) a WAR project and have tried to use a JSF form:
Warnung: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.ClassCastException: Object is not of remote type java.rmi.Remote
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:254)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:150)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$12.read(DynamicMethodMarshallerImpl.java:352)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:482)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:201)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:226)
at com.sun.ejb.codegen._GenericEJBHome_Generated_DynamicStub.create(com/sun/ejb/codegen/_GenericEJBHome_Generated_DynamicStub.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:421)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:75)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:527)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:487)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at de.chotime.jreports.beans.contact.ReportsContactWebSessionBean.<init>(ReportsContactWebSessionBean.java:237)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:119)
at org.jboss.weld.injection.ConstructorInjectionPoint.invokeAroundConstructCallbacks(ConstructorInjectionPoint.java:92)
at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:78)
at org.jboss.weld.injection.producer.AbstractInstantiator.newInstance(AbstractInstantiator.java:28)
at org.jboss.weld.injection.producer.BasicInjectionTarget.produce(BasicInjectionTarget.java:116)
at org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:180)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:158)
at org.jboss.weld.util.bean.IsolatedForwardingBean.create(IsolatedForwardingBean.java:45)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
at org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:76)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
at org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.get(ContextualInstanceStrategy.java:178)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:67)
at org.jboss.weld.event.ObserverMethodImpl.getReceiver(ObserverMethodImpl.java:339)
at org.jboss.weld.event.ObserverMethodImpl.getReceiverIfExists(ObserverMethodImpl.java:326)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:284)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:265)
at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:271)
at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:260)
at org.jboss.weld.event.EventImpl.fire(EventImpl.java:89)
at de.chotime.jreports.beans.login.ReportsUserLoginWebSessionBean.doUserLogin(ReportsUserLoginWebSessionBean.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.el.ELUtil.invokeMethod(ELUtil.java:332)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:537)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
at com.sun.el.parser.AstValue.invoke(AstValue.java:283)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)

My previous #JavaEE trainer said it is a bug in #Glassfish / #Payara but it starts to become more anoying. Does someone know something to prevent this from happening?

Yes, filling out a bug report may help. :-) But maybe there is a trick or so?

The most "outter" exception says:
javax.servlet.ServletException: javax.faces.view.facelets.FaceletException: javax.naming.NamingException: Lookup failed for 'java:global/jreports-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfaceorg.mxchange.jcontacts.contact.ContactSessionBeanRemote [Root exception is java.lang.ClassCastException]]

The interface in question (see the JNDI string end) "ContactSessionBeanRemote" is annotated with @Remote (javax.ejb.Remote) and not java.rmi.Remote as the exception says.

It is declared as following:
public interface ContactSessionBeanRemote extends Serializable {
...
}



Fix your server from an old bug dated back to #2001: https://httpoxy.org/ #httpoxy out-going traffic from your server is maybe affected (API calls). cc !security

You should act *now*, a HTTP header called "Proxy" is your enemy and the fix is simple (at least prevention).



Local "connect" not working


I think I found a #bug in #friendica, latest develop code. I have rebased my branch to latest changes and revert all of my is_filled_array() changes to dba::is_result().

So what I did was I created an account for my wife and tried to connect to but all I got was a redirect and no entry in table 'intro'. There is also no entry of her account in 'fcontact'.

So what is wrong?
in reply to Roland Häder

Ah, validate_url() misses to check $h with is_array(). Please try to cherry-pick my latest commits in branch rhaeder-develop (changed develop branch).


Slowest query in Friendica


I have run mysqldumpslow and found this query as very slow (to much rows):

Can someone please look into it optimizing it? The sub-query seems to be the cause.
in reply to Roland Häder

I guess it comes from mod/network.php when I view the "new items view".


Poller cron job reports error


The latest #develop code reports a problem started by poller.php:
PHP Warning: Invalid argument supplied for foreach() in /home/.../public_html/friendica/include/poller.php on line 208
PHP Stack trace:
PHP 1. {main}() /home/.../public_html/friendica/include/poller.php:0
PHP 2. poller_run() /home/.../public_html/friendica/include/poller.php:265
PHP 3. poller_kill_stale_workers() /home/.../public_html/friendica/include/poller.php:58
Maybe again some better variable tests? And I saw a message this #friendica installation is having problems, several hits on F5 (reload) key brought it back again.


Glassfish versus Wildfly (Tomcat EE) with custom JARs


I'm currently setting up a #Glassfish container for letting run my #JavaEE applications (will be #GNU #GPLv3 or maybe later #Affero) as this was later my choice after a previous unsuccessful attempt with #WildFly (LAN only).

Back what happened before. First of, I had Glassfish 4.1.1 which is currently bugged (#RuntimeException) and doesn't allow me to setup essential things like #JBDC resources or connection pools. So I tried WildFly next.

My applications have custom JARs (libs) which in Glassfish I need to copy to $DOMAIN_HOME/lib/ (and the #MySQL connector to $GLASSFISH_HOME/modules/) and that is all. With WildFly I had trouble even setting up a really simple #EJB (logging with #log4j over a local interface), because I was not able to find to where to my custom JARs (some really simple JARs are required + log4j). So I tried to setup all as modules (module.xml) but no success.

After many unsuccessful attempts I switched back to #Glassfish and found an older (but working) 4.1 version which finally let my applications and the #JPA stuff all work correctly.

Sadly, I now have to "hang around" with #Oracle which is known to be slow in fixing bugs ... But at least my applications are running ...

Not really a good argument for switching to WildFly or #TomcatEE, right? Or where do I have to put my JARs (and log4j)?



(&$a) in method/function headers?


I found this thing very often in #Friendica code:
bla.php:
&lt;?php
function bla_init(&amp;$a) {
  $a-&gt;doSomething();
}

Why & here? Is this an old way of code style? Well, it allows me to modify $a into anything I want, also something incompatible, like this:
bad.php:
&lt;?php
function bad_init(&amp;$a) {
$a = 'Something else';
$a = 0.0001; // Also works!
}

You really don't want this! Better use this:
better.php
&lt;?php
function better_init(App $a) {
  $a-&gt;doItSecurely();
}

Now you (the naughty programmer) cannot change $a into something nasty anymore.